package com.xxgc.vfc.api.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Author: SJY
 * @Date: 2023/11/14 09:00:44
 */
@Data
@ApiModel(value = "手机号密码VO", description = "手机号密码登录")
public class PhoneAndPassLoginVO {

    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$",message = "手机号必须为中国11位手机号")
    @ApiModelProperty("手机号码")
    private String phoneNumber;

    @NotNull(message = "密码不能为空")
    @Size(min = 8,max = 20,message = "密码必须在8-20位")
    @Pattern(regexp = "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).*$",message = "密码必须包含大小写字母和数字")
    @ApiModelProperty("密码")
    private String passWord;
}
